Film image reading system

ABSTRACT

A film image reading system includes: a number of photoelectric conversion elements for converting a light image of a film image to an analog image signal indicative of a magnitude corresponding to a light amount; an exposure controller for controlling exposure time of the conversion elements; a converter for converting the analog image signal to a digital image signal; a signal correcting device for correcting the digital image signal to a proper output image signal in accordance with a reference relationship between digital image signal and output image signal, the reference relationship having a first range for variables of digital image signal and a second range for variables of output image signal; and a range changing device for changing the first range of the reference relationship in accordance with a controlled exposure time.

BACKGROUND OF THE INVENTION

This invention relates to a film image reading system including acomputer and a film image reader used as a peripheral device of thecomputer.

As a peripheral device of a computer, a film image reader iscommercially available which picks up an image recorded in a frame of a35-mm film, processes the picked up image signal into a digital data,and transfers the thus obtained digital data to the computer. Such afilm image reader is provided with, as an image pickup device, a linesensor including, e.g., a CCD (Charge Coupled Device). The line sensoris slid or moved with respect to a strip of the film in a sub-scanningdirection (longitudinal direction of the film) to pick up an image ineach frame line by line. Then, image data reading conditions such as anexposure time are calculated based on the data obtained by pre-scanning,and the image is scanned based on the calculated conditions. During theimage reading operation, the prior art film image reader controls theexposure time according to the image density of the film.

However, with the prior art film image reader, if the exposure time istoo long, it takes time to output the read image from the film imagereader to the computer, resulting in a reduced operability. This problemmay be overcome by shortening the exposure time to a predetermined timeand increasing the gain at an output or input side of the CCDs for theimage in a latitude area not corresponding to the exposure time.However, in this case, the noises are amplified together with theamplitude of the CCD output. This results in a poor quality of theoutput image.

SUMMARY OF THE INVENTION

It is an object of the present invention to provide a film image readingsystem which has overcome the problems residing in the prior art.

It is another object of the present invention to provide a film imagereading system which can obtain a high quality image within a shorterperiod of time.

The present invention is directed to a film image reading systemcomprising: an image pickup device which picks up a light image of animage recorded on a film to produce a raw image signal indicative of amagnitude corresponding to a light amount of the light image; a signalcorrecting device which corrects the raw image signal to a proper outputimage signal in accordance with a reference relationship between rawimage signal and output image signal, the reference relationship havinga first range for variables of raw image signal and a second range forvariables of output image signal; and a range changing device whichchanges the first range of the reference relationship in accordance witha magnitude of the raw image signal.

The range changing device may shorten the first range of the referencerelationship when the magnitude of the raw image signal is smaller thana predetermined value.

The image pickup device may be provided with a number of photoelectricconversion elements arranged in a predetermined form, the photoelectricconversion elements converting a light image to an analog image signal;and a converter for converting the analog image signal to a digitalimage signal indicative of a light magnitude level. The converter may bepreferably provided with a shading correcting device.

Further, it may be appreciated to further provide the film image readingsystem with a reading condition controller for controlling a readingcondition of the image pickup device. It may be preferable that thereading condition controller controls the image pickup device to performa pre-scanning of the film before picking up a light image of an imagerecorded on the film and sets a reading condition of the image pickupdevice based on a result of the pre-scanning.

Further, the present invention is directed to a film image readingsystem comprising: an image pickup device including a number ofphotoelectric conversion elements arranged in a predetermined form, theimage pickup device converting a light image of an image recorded on afilm to an analog image signal indicative of a magnitude correspondingto a light amount of the light image; an exposure controller whichcontrols exposure time of the image pickup device; a converter whichconverts the analog image signal to a digital image signal indicative ofa light magnitude level; a signal correcting device which corrects thedigital image signal to a proper output image signal in accordance witha reference relationship between digital image signal and output imagesignal, the reference relationship having a first range for variables ofdigital image signal and a second range for variables of output imagesignal; and a range changing device which changes the first range of thereference relationship in accordance with a controlled exposure time.

The exposure controller may preferably control the image pickup deviceto perform a pre-scanning of the film before picking up a light image ofan image recorded on the film and sets an exposure time of the imagepickup device based on a result of the pre-scanning.

The exposure controller may be provided with a calculator whichcalculates an exposure time corresponding to a result of thepre-scanning; a discriminator which discriminates whether a calculatedexposure time is greater than a predetermined value; and a setter whichis responsive to the discriminator and sets an exposure time of theimage pickup device to the predetermined value when the calculatedexposure time is discriminated to be greater than a predetermined value;and the range changing device is responsive to the discriminator andshortens the first range of the reference relationship when thecalculated exposure time is discriminated to be greater than apredetermined value.

With the thus-constructed film image reading system, a raw image signalindicative of a magnitude corresponding to a light amount of the lightimage is corrected to a proper output image signal in accordance with areference relationship between raw image signal and output image signal.The reference relationship has a first range for variables of raw imagesignal and a second range for variables of output image signal. Thefirst range of the reference relationship is changed in accordance witha magnitude of the raw image signal. This will assure higher qualityoutput image signals.

Also, a reading condition of the image pickup device is set based on aresult of a pre-scanning of the film before picking up a light image ofan image recorded on the film. This makes it possible to set an optimumreading condition corresponding to recorded conditions of images on aloaded film.

Further, the exposure time of the image pickup device is controllable.The exposure time is set based on a result of a pre-scanning. However,the exposure time is set to a predetermined value when a value obtainedby calculation based on a result of a pre-scanning is greater than thepredetermined value. Accordingly, the image pickup can be performed in ashorter time.

These and other objects, features and advantages of the presentinvention will become more apparent upon a reading of the followingdetailed description and accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of a film image reading system according tothe invention;

FIG. 2 is a perspective view showing an exterior of a film image readerof the image reading system;

FIG. 3 is a diagram showing a combination of the film image reader and ahost computer;

FIG. 4 is an exploded perspective view showing a construction of a mainportion of the film image reader;

FIG. 5 is a graph showing an example of table data of black levelcorrection values;

FIG. 6 is a graph showing an example of the black level correction valuetable data in the case of a negative film;

FIG. 7 is a graph showing black level correction value table data when adigital gain is 1.5 in FIG. 6;

FIG. 8 is a graph showing an example of the black level correction tabledata in the case of a positive film;

FIG. 9 is a flowchart showing a procedure of a "SET-UP" routine;

FIG. 10 is a flowchart showing a procedure of setting image data readingconditions; and

FIG. 11 is a flowchart showing a subroutine "Black Level Correction DataSetting".

DETAILED DESCRIPTION OF THE PREFERRED Embodiments of the Invention

A construction of a film image reading system according to the inventionis described with reference to FIGS. 1 to 4.

The film image reading system is provided with a film image reader 100and a host computer (hereinafter, "host PC") 200.

The film image reader 100 is connected with the host PC 200 inaccordance with the SCSI standards, and functions as a peripheral deviceof the host PC 200 for supporting an image processing software whichruns on the host PC 200.

Specifically, the film image reader 100 includes an optical system 1, animage pickup device (hereinafter, "CCD") 2, an amplifier unit 3, ananalog multiplexer (hereinafter, "MPX") 4, a digital-to-analog (D/A)converter 5, an analog-to-digital (A/D) converter 6, a digital signalprocessor 7, an output data buffer 8, a DMA controller 9, an SCSIcontroller 10, a timing signal generator 11, and a CPU 12.

A power switch 152 and a focusing button 153 are provided at a bottom ofthe front surface of the film image reader 100. A film inlet 154 isformed above the button 153. The button 153 is operated to adjust thefocal length of a lens system 102 (see FIG. 4) for forming a light imageof a developed film 13 on a sensing surface of the CCD 2 including a CCDline sensor. The film inlet 154 is used to set the film 13 so as to readimages recorded in respective frames of the film 13 (hereinafter, "filmimage"). The film inlet 154 is provided with a shutter 191 which isopenable and closable so as to prevent entrance of dusts or the likeinto the film image reader through the inlet 154.

The film image reader 100 is capable of reading images recorded in aslide (mounted positive film) 131 or in a negative film 132 mounted on aspecial negative carrier. Both the slide 131 and the negative film 132can be set through the film inlet 154.

The film image reader 100 functions as a peripheral device forsupporting image processing in the host PC 200. The host PC 200 includesa controller main body 261, a display 262 and a keyboard 263 as shown inFIG. 3. The film image reader 100 is connected with the controller mainbody 261 via an SCSI cable 264, and performs an image reading operationin accordance with a control command from the host PC 200.

Specifically, upon need of film images, the host PC 200 sends aspecified command to the film image reader 100, causing it to read filmimages. The film image reader 100 implements initialization inaccordance with the command sent from the host PC 200, reads data offilm image (image data) by moving the CCD 2 with respect to the filmimages of the film 13, applies a specified image processing to therespective image data, and then transfers the processed image data tothe host PC 200. This host PC 200 displays the received image data onthe display 262 and stores them in an image memory provided in thecontroller main body 261.

The pickup operation of the film image and the transfer of the imagedata to the host PC 200 are repeated line by line. Upon completion ofthe transfer of the image data for all film images, the film imagereader 100 finishes the film image reading operation. If the host PC 200instructed the image reading operation in an auto-eject mode, the filmimage reader 100 ejects the film upon completion of the image readingoperation.

In the film image reader 100, a film feeding system is provided in aposition facing the film inlet 154. The film feeding system includes acarriage 158 for loading the film 13 inserted through the film inlet154, and a pulse motor 159 for reciprocally moving the carriage 158toward and away from the film inlet 154 (directions S in FIG. 4).

The carriage 158 includes, at its bottom, a nut portion 158a which isspirally fitted with a drive shaft 159a, a threaded bar, of the pulsemotor 159. The drive shaft 159a extends in parallel with the directionsS. By rotating the drive shaft (threaded bar) 159a, the nut portion 158alinearly moves along the drive shaft 159a, thereby reciprocally movingthe carriage 158 along the directions S.

A light blocking plate 158b projects downward from the bottom face ofthe nut portion 158a. The plate 158b acts to block a light of aphotoelectric switch 168 for detecting the carriage 158 in a homeposition. The photoelectric switch 168 has a U-shaped groove on whichinner surface a light emitting element and a light receiving element arearranged to face each other, and is disposed in a suitable positionbelow the leading end of the drive shaft 159a. When the carriage 158moves to the home position, the light blocking plate 158b enters theU-shaped groove of the photoelectric switch 158b, thereby blocking thelight emitted from the light emitting element. As a result, an arrivalof the carriage 158 to the home position is detected.

On the other hand, in a specified position of the base end of the driveshaft 159a, there is provided an eject member 169 for moving the film 13toward a loading inlet of the carriage 158 when the carriage 158 movesto an end position of its movable range. The eject member 169 includes asupport 169b and a contact pin 169a projecting in a specified positionof a side surface of the support 169b facing the carriage 158. Thecontact pin 169a is capable of being brought into contact only with thefilm 13 in the carriage 158.

While the carriage 158 is moving to the end position, the contact pin169a of the eject member 169 comes into contact with the side face ofthe film 13 in the carriage 158 immediately before the carriage 158reaches the end position, thereby restricting the movement of the film13. Accordingly, the film 13 moves toward the loading inlet with respectto the carriage 158, with the result that a film loading position in thecarriage 8 is shifted and a part of the film 13 projects from theloading inlet. Thus, if the carriage 158 is moved to the home positionin this state, a part of the film 13 projects from the film inlet 154 ofthe film image reader 100, allowing the withdrawal thereof.

In a specified position on the left side of the carriage 158 withrespect to its moving direction (a direction in which the film 13 movesaway from the film inlet 154), an illumination unit is provided whichincludes a lamp 101 such as a fluorescent lamp for illuminating the film13 set in the carriage 158 and a semicylindrical reflecting plate 111for reflecting the light from the lamp 101 toward the film 13. In aspecified position on the right side of the carriage with respect to itsmoving direction, an image pickup system is provided which includes theCCD 2, the lens system 102 for focusing the light image of the filmimage on the CCD 2, and a mirror 164 for introducing the light imageonto the CCD 2. Light to be incident upon the image pickup system isblocked by a light blocking plate 103 disposed between the film feedingsystem and the image pickup system.

The light blocking plate 103 is formed with a slit-like exposure window103a in a position facing the lamp 101. The light image of the film 13illuminated by the lamp 101 is introduced to the image pickup systemwhile being divided into slit light images by the exposure window 103a.

In a specified position of the light blocking plate 103, an L-shapedshutter member 166 is provided which closes the exposure window 103awhen the carriage 158 moves to the home position. The base end of theshutter member 166 is rotatably carried by the light blocking plate 103.A lever 167 for opening and closing the shutter member 166 according tothe movement of the carriage 158 projects from the carriage 158.

While the carriage 158 moves toward the film inlet 154, the level 167comes into contact with a light blocking portion 166a of the shuttermember 166. As the carriage 158 further moves, the shutter member 166 ispressed toward the exposure window 103a by the lever 167. Upon arrivalof the carriage 158 to the home position, the light blocking portion166a of the shutter member 166 completely closes the exposure window103a (a state indicated by phantom line in FIG. 4), thereby completelypreventing the incident of the light on the image pickup system.

On the other hand, when the carriage 158 moves toward the pulse motor159 from the home position, the lever 167 moves accordingly. As thelever 167 moves, the shutter member 166 rotates due to its weight in adirection reverse from the rotating direction when the exposure window103a is closed. When the lever 167 is brought out of contact with theshutter member 166, the light blocking portion 166a of the shuttermember 166 completely retracts from the exposure window 103a, therebyallowing the light image to be projected onto the image pickup system.

In this embodiment, the shutter member 166 is rotatable so as to rotatefrom the closing position where it closes the exposure window 103a tothe retracted position due to its weight. However, the shutter member166 may be movable in the sub-scanning direction and be biased towardthe retracted position by a biasing member such as a spring. Such ashutter member returns from the closing position to the retractedposition by the biasing force of the biasing member.

The CCD 2 is constructed by a color line sensor in which three linesensors each including a plurality of linearly arranged photoelectricconversion elements are arranged side by side. The respective linesensors are provided with color filters of red (R), green (G) and blue(B). The CCD 2 picks up the film image by separating it into therespective color components of R, G, B line by line.

Each line sensor includes a charge storing device for storing electriccharges corresponding to an amount of incident light and a transferdevice for reading the stored electric charges. At the base end of thecharge storing device (at an end where the leading pixel is arrangedwhen light reception signals (hereinafter, pixel signals) of therespective pixels are read), there is provided a black reference outputportion for outputting a reference black level signal. In anintermediate portion of the charge storing device, there is provided asignal output portion for outputting the signal representative of thepicked up film image. The pixels in the black reference output portionare masked, and the respective pixels in the signal output portion areprovided with color filters.

The film image is read as follows. The carriage 158 in which the film 13is set is fed to a specified image pickup position, the slit images ofthe film 13 divided by the exposure window 103a are projected onto theCCD 2. Electric charges are stored in the charge storing device of theCCD 2 during an exposure time set by the host PC 200, the stored chargesare read to an external device via the transfer device. The chargesstored in the respective pixels are read in a main scanning direction (adirection from the base end to the rear end of the line sensor, adirection from the lower end to the upper end of the CCD 2 in FIG. 4).

The amplifier unit 3 includes amplifiers 31G, 31R, 31B, and clampingcircuits 32G, 32R, 32B arranged at upstream and downstream sides incorrespondence with the respective channels of G, R, B. The amplifiers31G, 31R, 31B applies gain adjustments to the image signals of therespective channels in accordance with analog gains input from the CPU12 via the D/A converter 5. The analog gains are calculated in the hostPC 200 in accordance with a procedure to be described later.

The clamping circuits 32G, 32R, 32B adjust black levels of therespective color image signals to clamp level output from the blackreference output portion of the CCD 2 on the basis of a clamp levelinput from the CCD 2 via the D/A converter 5.

The MPX 4 selectively serially output the image signals of therespective channels. The A/D converter 6 converts the analog signal intoa digital signal consisting of a multitude of bits. For example, the A/Dconverter 6 converts the analog color image signal into a digital signalof 10 bits.

The digital signal processor 7 includes a black level correcting device71, a shading correcting device 72, a γ-LUT (look-up table) 73, RAMs 74,75, switches SW1, SW2 and SW3. The processor 7 applies specifiedcorrections such as black level correction, shading correction andγ-correction to the digitized image signals of the respective channels(hereinafter, "image data"), and outputs the thus obtained image data tothe output data buffer 8. The γ-LUT 73 and the RAMs 74, 75 areconstructed by SRAMs or the like, respectively, and the data for thecorrections are stored in tables.

The black level correcting device 71 applies a black level correctionusing the table data stored in the RAM 74 in accordance with a procedureto be described later. This correction is made to cancel an offset of aninput level to the A/D converter 6 when the shading correction is to bemade or the film image or like data is to be read.

The shading correcting device 72 applies a shading correction using thetable data stored in the RAM 75 in accordance with a procedure to bedescribed later. The shading correction is made to cancel shading causedby the optical system 1 and the CCD 2.

The γ-LUT 73 is used for negative/positive inversion for inverting animage data of a negative image into an image data of a positive imageand for the γ-correction for the G-, R- and B-signals.

The table data stored in the RAMs 74, 75 and the γ-LUT 73 are set byrewriting the memory contents by the host PC 200 via the DMA controller9 and the SCSI controller 10.

The switches SW1, SW2 and SW3 are switched on and off to allow the imagedata to pass the black level correcting device 71, the shadingcorrecting device 72 and/or the γ-LUT 73 while the image data is outputfrom the A/D converter 6 to the output data buffer 8. The respectiveswitches are on-off controlled by the host PC 200 via the SCSIcontroller 10. In FIG. 1, the switches SW1, SW2 and SW3 are on.

The output data buffer 8 is a memory for temporarily storing therespective color image data of G, R, B, which are output from the outputdata buffer 8 to the host PC 200 via the DMA controller 9 and the SCSIcontroller 10.

The DMA controller 9 controls the transfer of the table data and theimage data between the SCSI controller 10 and the γ-LUT 73, the RAMs 74,75, the output data buffer 8. The SCSI controller 10 functions as aninterface in sending and receiving a variety of data including the imagedata between the film image reader 100 and the host PC 200.

The timing signal generator 11 outputs timing signals for controllingthe driving timings of the respective elements in accordance with acontrol signal from the CPU 12. To the CCD 2 is input a timing signalfor controlling a charge storing time (hereinafter, "exposure time") inthe charge storing device, and the like. A timing signal used for theclamp level adjustment is input to the clamping circuits 32G, 32R, 32B.Further, clock signals for the synchronization are input to the MPX 4and the A/D converter 6.

The CPU 12 includes a microcomputer provided internally with a ROM 121for storing, e.g., control programs and a RAM 122 for temporarilystoring the data, and controls the operation of the respective elementsof the film image reader 100. Specifically, the CPU 12 controls theoptical system 1 and a film carrier when the film 13 is scanned, theoutput of the timing signals from the timing signal generator 11 basedon the exposure time data sent from the host PC 200 via the SCSIcontroller 10, and the gain adjustment in the amplifier unit 3 via theD/A converter 5 in accordance with the analog gains sent from the hostPC 200 via the SCSI controller 10.

The CPU 12 also performs the following operations (1) to (3) inaccordance with procedures to be described later. A variety ofcalculations are made by the host PC 200.

(a) Set-UP Operation

This operation is performed every time the film image reader 100 ispowered in order to cancel a variation of a light amount and colorbalance caused by a change of the lens system 102, particularly the lamp101 and the CCD 2 over time. The set-up operation includes a presetoperation, the shading correction and the black level correction.

The preset operation is performed to calculate the exposure time of theCCD 2 and the analog gains which are necessary when the data for theshading correction are read, when the image data are read in the case ofa positive film, and when the pre-scanned image data are read in thecase of a negative film.

In the shading correction, the illumination light from the lamp 101 isdirectly projected onto the CCD 2, i.e., the CCD 2 is illuminatedwithout the film 13. The image data is read and transferred to the hostPC 200. A correction values calculated by the host PC 200 based on thisimage data are stored in the RAM 75.

In the black level correction, the image data of one line of the CCD 2is read in a non-signal state where the exposure window 103a is closedby the shutter member 166. At this time, in order to perform high speeddata transfer and calculation, the switch SW3 is turned on and a tabledata of FIG. 5 is set in the γ-LUT 73. The obtained image data istransferred to the host PC 200. A correction values calculated by thehost PC 200 based on the image data are stored in the RAM 74.

(2) Pre-Scanning

In the case that the film 13 is a negative film, pre-scanning isperformed before main scanning in order to calculate the exposure timeand the analog gains used when the image data is read by main scanningand to carry out an AE calculation such as a discrimination of the typeof the image to be described later. During the pre-scanning, theexposure time and the analog gains calculated during the set-upoperation are read. It should be appreciated that the image data may beread in a compressed manner.

(3) Main Scanning

The image is read under the reading conditions calculated during thepre-scanning in the case that the film 13 is a negative film, whereas itis read under the reading conditions obtained during the set-upoperation in the case that the film 13 is a positive film. The readimage data is transferred to the host PC 200 via the DMA controller 9and the SCSI controller 10.

Next, the host PC 200 is described. The host PC 200 includes an SCSIcontroller 201, a reading mode setting device 202, a data reading device203, a data calculating device 204, a data setting device 205, a datatransferring device 206, a frame memory 207 and a monitor 208.

The SCSI controller 201 functions as an interface in sending andreceiving the data between the film image reader 100 and the host PC200. The reading mode setting device 202 is adapted to set the type ofthe film 13, i.e., a negative film or positive film, to be set in thefilm image reader 100. The data reading device 202 includes a RAM orlike storage medium, reads and stores the image data out of the datasent from the film image reader 100.

The data calculating device 204 performs the following calculations anddiscriminations (1) to (5) in accordance with procedures to be describedlater, using the image data sent from the film image reader 100 or thelike.

(1) Calculation of Initialization Values

Based on the image data of one line of the CCD 2 which was read when thefilm 13 is not set, there are calculated initialization values includingthe exposure time of the CCD 2 and the analog gains which are necessaryduring the shading correction, during the reading of the image data fromthe positive film, and during the reading of the AE data of the negativefilm.

(2) Calculation of a Shading Correction Value

A shading correction value is calculated based on the image data of oneline of the CCD 2 which was read without the film 13 during the shadingcorrection.

(3) Calculation of a Black Level Correction Value

A black level correction value is calculated based on the image data ofone line of the CCD 2 which was read in the non-signal state where theexposure window 103a is closed by the shutter member 166.

(4) AE Calculation

In the case that the film 13 is a negative film, setting conditionsduring the main scanning are calculated based on the image data readduring the pre-scanning. Specifically, the following processings aremade.

(4-1) White Balance Failure Discrimination

The image data of the respective channels of G, R, B read during thepre-scanning are divided into specified blocks, and an average value iscalculated for each block. Base balances of the R-, B-channels arecalculated in accordance with procedures to be described later based ona maximum average value of the G-channel and average values of theblocks of the R-, B-channels corresponding to the block of the G-channelhaving the maximum average value. Unless the base balance of the channellies within a specified range, the image data is discriminated to have awhite balance failure (hereinafter, "WB failure"), and a WB flag thereofis set. In other words, WB flag(R)=1 or WB flag(B)=1.

(4-2) Color Failure Discrimination

An image reference value of each channel is calculated based on theblock average value thereof in accordance with a procedure to bedescribed later. Color balances of the R-, B-channels are calculatedbased on the image reference values and the base balances in accordancewith a procedure to be described later. Unless the color balance lieswithin a specified range, the image of this channel is discriminated tohave a color balance failure (hereinafter, "CF failure"), and the CFflag thereof is set. In other words, CF flag(R)=1 or CF flag(B)=1. Theimage having a color balance failure or color failure image has apartiality in color.

(4-3) Image Type Discrimination

The image type is discriminated based on a combination of the WB flagsand CF flags of the R-, B-channels as shown in TABLE-1. TABLE-1 showsimage types to be discriminated based on the combination of the WB flagsand CF flags of the R-, B-channels.

                  TABLE 1                                                         ______________________________________                                        FLAG  R-CHANNEL   B-CHANNEL                                                   COM   WB      CF      WB    CF                                                B.    FLAG    FLAG    FLAG  FLAG  IMAGE TYPE                                  ______________________________________                                        1     0       0       0     0     STANDARD IMAGE                              COMBs. OTHER THAN 1 TO 9                                                      2     0       1       0     0     COLOR FAILURE                               3     0       0       0     1     IMAGE                                       4     0       1       0     1                                                 5     1       0       0     0     BLACK-FREE IMAGE                            6     0       0       1     0                                                 7     1       0       1     0                                                 8     1       1       0     0     BLACK-FREE AND                              9     0       0       1     1     COLOR FAILURE                                                                 IMAGE                                       ______________________________________                                    

As shown in TABLE-1, if WB flag(R)=flag(B)=0, and CF or CF flag(R)=1flag(B)=1, i.e. in the case of combinations 2, ,3, 4, the image isdiscriminated to be a color failure image.

If CF flag(R)=CF flag(B)=0, and WB flag(R)=1 or WB flag (B)=1 or WBflag(R)=WB flag (B)=1, i.e. in the case of combinations 5, 6, 7, theimage is discriminated to be a black-free image.

Further, if WB flag(R)=CF flag(R)=1, and WB flag(B) =CF flag (B)=0, i.e.in the case of a combination 8 or if WB flag (R) =flag(R)=0, and WBflag(B)=CF flag(B)=1, i.e. in the case of a combination 9, the image isdiscriminated to a black-free and color failure image.

If WB flag(R)=CF flag(R)=WB flag(B)=CF flag(B)=0, in the case of acombination 1, the image is discriminated to be a standard image. Whenthe combination is other than the combinations 1 to 9, the image is alsodiscriminated to be a normal image.

(4-4) Calculation of Exposure Time and Analog Gains

The exposure time and the analog gains are calculated based on thecombination of the WB flags and CF flags of the R-, B-channels inaccordance with a procedure to be described later.

(4-5) Calculation of Digital Gain

In the case that the calculated exposure time exceeds a predeterminedtime T₀, a ratio T/T₀ of the calculated exposure time T to thepredetermined time T₀, i.e. a digital gain DTG (=T/T₀) is calculated.

(5) Calculation of γ-LUT Data

For the N/P inversion and γ-correction in the case of the negative film13 and for the γ-correction in the case of the positive film 13, a tabledata to be set in the γ-LUT 73 is calculated in a procedure to bedescribed later.

The data setting device 205 sets the respective data based on the valuescalculated by the data calculating device 204. The data transferringdevice 206 converts the respective set data into transfer data in formsuitable to be transferred. The converted transfer data are transferredto the respective elements of the film image reader 100 via the SCSIcontroller 201.

The frame memory 207 is adapted to store one frame of image dataobtained by the main scanning under the set reading conditions. Themonitor 208 includes a CRT and displays the film image stored in theframe memory 207.

Next, the calculation of the LUT data to be set in the γy -LUT 73 forthe N/P inversion and the γ-correction in the case of the negative film13 is described.

The N/P inversion is carried out in accordance with Equations (1) to(3). PX_(IN) and PX_(OUT) denote an image data input to the γ-LUT 73 andan image data output therefrom, respectively.

When 0<PX_(IN) <foot₋₋ point,

    PX.sub.OUT =(A-1023)/foot.sub.-- point×1023          (1)

When foot₋₋ point≦PX_(IN) <knee₋₋ point,

    PX.sub.OUT =10.sup.(log.sbsp.10.sup.(1023)-γ×log.sbsp.10.sup.(PX.sbsp.IN.sup.)+ycn)                                                 (2)

When knee₋₋ point<PX_(IN) <1023,

    PX.sub.OUT =B/(1023-knee.sub.-- point)×(1023-PX.sub.IN)(3)

A in Equation (1) denotes PX_(OUT) when PX_(IN) =foot₋₋ point (see pointF in FIG. 3), B in Equation (3) denotes PX_(OUT) when PX_(IN) =knee₋₋point (see point K in FIG. 3), and ycn in Equation (2) denotes aPx_(out) intercept when {γ×log₁₀ (PX_(IN))+ycn} passes table referencepoints (STx, STy). Further, foot₋₋ point=STx-50 and knee₋₋ point=512.

On the other hand, for the γ-correction, γ(R)=1.375, γ(G)=1.197 andγ(B)=1.197 are used for the respective colors.

An example of thus obtained table data for the N/P inversion and theγ-correction is shown in FIG. 6.

In the case that the calculated exposure time T exceeds thepredetermined time T₀, an input side of the γ-LUT data is compressed atthe digital gain DTG, and the exposure time is set to the predeterminedtime T₀. For example, if the table data is as shown in FIG. 6, the tabledata is changed to the one shown in FIG. 7 if the digital gain DTG=1.5.

FIG. 7 is obtained by changing the table data of FIG. 6 such that aninput level is compressed to 2/3 in relation to an output level. Morespecifically, in FIG. 6, for the input level variable from 0 to 1023,the output level varies from 255 to 0. In FIG. 7, for the input levelvariable from 0 to 682, the output level varies from 255 to 0, and theoutput level is 0 for the input level of 683 to 1023. Accordingly, thecurves are more steeply sloped in FIG. 7 than in FIG. 6.

Similarly, if the digital gain DTG=2.0 in the case of FIG. 3, for theinput level variable from 0 to 512, the output level varies from 255 to0, and the output level is 0 for the input level of 513 to 1023. Thus,the curve is more steeply sloped than the one in FIG. 7.

The compression of the input level by the digital gain may be carriedout only when a preview image, i.e., an image data used to confirm thebrightness and colors of the image prior to the main scanning is read.

Next, the calculation of the LUT data to be set in the γ-LUT 73 for theγ-correction in the case of the positive film 13 is described.

The γ-correction is performed in accordance with Equations (4) and (5).PX_(IN) and PX_(OUT) denote an image data input to the γ-LUT 73 and animage data output therefrom, respectively.

When 0<PX_(IN) <foot₋₋ point,

    PX.sub.OUT =4×PX.sub.IN                              (4)

When foot₋₋ point<PX_(IN) <1024,

    PX.sub.OUT =1023×{PX.sub.IN /1023).sup.0.45 }        (5)

where foot₋₋ point=82.

An example of thus obtained table data for the γ-correction of thepositive film is shown in FIG. 8.

As shown in Equations (4) and (5), the same equation is used for therespective colors of G, R, B in the case of the positive film, and thevalues are fixed. Accordingly, the table data may be calculated inadvance and stored in the ROM 121, and may be set in the γ-LUT 73 fromthe ROM 121 when the image data is read.

As described above, in the case of the negative film 13, an image outputspeed at which the entire frame of image is output is slow if theexposure time T exceeds the predetermined time T₀. However, since theexposure time is set to T₀ if the calculated exposure time T exceeds thepredetermined time T₀, the image can be output to the output data buffer8 within a shorter period of time.

Further, the ratio of the calculated exposure time T to thepredetermined time T₀, i.e., the digital gain is calculated and theinput level is compressed at the digital gain when the γ-LUT data to beset in the γ-LUT 73 is calculated. Accordingly, an output of an image inthe latitude area not corresponding to the exposure time is allowed tohave a high quality.

FIG. 9 is a flowchart showing a procedure of the set-up operation whichis carried out every time the film image reader 100 is powered.

First, the initialization for the black level correction and the shadingcorrection is carried out (Step #101).

More specifically, the exposure time SET₋₋ T and the analog gains GGAIN,RGAIN, BGAIN of the respective channels are set, e.g., SET₋₋ T=0.46msec, GGAIN=RGAIN=BGAIN=6 dB so that the level of the signal input tothe A/D converter 6 does not overflow even in the case that thevariation of the devices such as the lamp 101 and the lens system 102are at maximum. At this stage, the switches SW1, SW2, SW3 are on, off,on, respectively, and the shading correction and the γ-correction arenot performed.

Subsequently, a black level correction data is set in accordance with aprocedure to be described later (Step #103), and then a white image datais read (Step #105).

The white image data refers to an image data picked up when the film 13is not set between the lamp 101 and the CCD 2. Specifically, the imagedata is read 16 times by one line of the CCD 2, i.e., 2688 pixels×3channels.

Subsequently, data reading conditions for the shading correction arecalculated (Step #107).

First, a sum or an average value of the 16 data read in Step #105 iscalculated for each channel and each pixel. Further, in order to avoidan influence of noises, the input data is divided into 32 blocks, and asum or an average value of the image data obtained by 84 pixels iscalculated for each block. A maximum value within the block of theG-channel is set to Gmax, and the R-channel and B-channel of the sameblock are set to Rmax, Bmax.

An exposure time SHD₋₋ T used for the shading correction is calculatedin accordance with Equation (6) which restricts an input range to 90% sothat the level of the signal input to the A/D converter 6 does notoverflow.

    SHD.sub.-- T=0.9×SET.sub.-- T×255/Gmax         (6)

Further, the analog gains of the respective channels are calculatedbased on Gmax, Rmax, Bmax as seen in Equation (7):

    GGAIN=6 dB

    RGAIN=Gmax/Rmax+6 dB

    BGAIN=Gmax/Bmax+6 dB                                       (7)

Subsequently, the respective conditions for reading the shadingcorrection data are set (Step #109).

The exposure time and the analog gains of the respective channels areset to the values calculated in Step #107. Further, the switches SW1,SW2 and SW3 are held on, off, off, respectively.

Subsequently, the black correction data are set in a procedure to bedescribed below (Step #111). Then, the image used for the shadingcorrection is read (Step #113).

The image data is read 64 times by one line of the CCD 2, i.e., 2688pixels×3 channels when the film 13 is not set between the lamp 101 andthe CCD 2.

Subsequently, the shading correction values are calculated (Step #115).First, a sum or average value of the 64 image data is calculated foreach channel and pixel. If Gmax₋₋ s, Rmax₋₋ s, Bmax₋₋ s denote maximumvalues of the calculated values of the respective channels, shadingcorrection values GSHDDATA(pix), RSHDDATA(pix), BSHDDATA(pix) of therespective pixels are calculated as ratios of the maximum values Gmax₋₋s, Rmax₋₋ s, Bmax₋₋ s of the respective channels to values G(pix),R(pix), B(pix) of the pixels as seen in Equation (8):

    GSHDDATA(pix)=Gmax.sub.-- s/G(pix)

    RSHDDATA(pix)=Rmax.sub.-- s/R(pix)

    BSHDDATA(pix)=Bmax.sub.-- s/B(pix)                         (8)

Then, the calculated shading correction values are transferred (Step#117). The calculated values are converted into transfer data which aretransferred line by line in the order of G, R, B via the SCSI controller201 and stored in the RAM 202 of the CPU 12 via the SCSI controller 10.

Subsequently, reading conditions in the case of the positive film arecalculated (Step #119). The exposure time and the analog gains used forreading the image data when a positive film is set in the film imagereader 100 as the film 13 are set to fixed values regardless of thefilm.

An exposure time POS₋₋ T is calculated in accordance with Equation (9)so that a maximum transmittance of a standard positive film is 100% ofthe input range of the A/D converter 6:

    POS.sub.-- T=SET.sub.-- T×255×(Gmax×0.8) (9).

Further, the analog gains are so calculated so that the white balancesuits when the film 13 is not set and are, in this embodiment,calculated in accordance with Equation (7) similar to the shadingcorrection data reading conditions.

Subsequently, reading conditions in the case of the negative film arecalculated (Step #121). First, when a negative film is set in the filmimage reader 100 as the film 13, initial values used to performpre-scanning for the AE calculation are calculated.

An exposure time AE₋₋ T is calculated based on SET₋₋ T and Rmax inaccordance with Equation (10) lest the light transmitted through a basearea of a standard negative film should exceed the input level of theCCD and saturate:

    AE.sub.-- T=1.4×SET.sub.-- T×255/(Rmax×0.6)(10).

The analog gains GGAIN, RGAIN, BGAIN of the respective channels arecalculated in accordance with Equation (11) so as to cancel the color ofthe base area of the standard negative film:

    GGAIN=6 dB

    RGAIN=Gmax/(Rmax×2.5)+6 dB

    BGAIN=Gmax/(Bmax×0.7)+6 dB                           (11).

The color of the base area of the standard negative film is expressed asR:G:B=2.5:1:0.7.

Subsequently, a shading offset value SDOF used to calculate the exposuretime for reading the image data obtained from the negative film iscalculated as follows. One line of data of the G-channel obtained inStep #113 is divided into 32 blocks, and a sum or an average value ofthe data corresponding to 84 pixels is calculated for each block. Thevalue SDOF is calculated in the form of a ratio of the value of eachblock to the maximum value Gmax thereof.

FIG. 10 is a flowchart showing a procedure of setting image data readingconditions.

First, it is discriminated whether the mode set in the reading modesetting device is a negative film mode or positive film mode (Step#201). If the positive film mode is set (NO in Step #201), Step #301follows.

On the other hand, if the negative film mode is set (YES in Step #201),the conditions for reading the image data during the pre-scanning forthe AE calculation are set (Step #203). At this stage, the exposure timeand the analog gains of the respective channels are set to the valuescalculated in Step #121. The switches SW1, SW2 and SW3 are set on, on,off, respectively, and the black level correction and the shadingcorrection are carried out.

Subsequently, the black level correction data are set in accordance witha procedure to be described below (Step #205). The image data in theentire recording area of the film 13 is read under the readingconditions set in Step #203, e.g., at a compression ratio of 1/12 lines.The obtained image data is transferred to the host PC 200 (Step #207).

The image data is compressed to perform the processing faster. Thereduction in the image quality caused by the image compression does notmatter because the pre-scanning is made only for the AE calculation. Ifthe compression ratio is set to 1/12, only one line of image is pickedup out of 12 lines of image. The AE data can be calculated with a smallamount of image data.

The calculations are performed in the data calculating device 204 of thehost PC 200 (Steps #209 to #225). First, in order to avoid an influenceof noises or the like, the input image data is divided into 42×32 blocksfor each channel, and an average value of each block is calculated.Further, an average value of the black level correction data for eachpixel is calculated and set to KAVE (Step #209).

Subsequently, an exposure time NEG₋₋ T is calculated (Step #211). First,maximum values MXG, MXR, MXB of the respective channels are obtained outof the average values of the respective blocks calculated in Step #209,and are converted into output levels CCDG, CCDR, CCDB of the CCD 2 inaccordance with Equation (12):

    CCDG=MXG

    CCDR=MXR×2.5

    CCDB=MXB×0.7                                         (12).

The exposure time NEG₋₋ T is calculated in accordance with Equation (13)so that these values are read as a maximum level of a 10 bit range inthe γ-LUT 73 after being corrected in the black level correcting device71 and the shading correcting device 72:

NEG₋₋ T=AE₋₋ T×(1023-KAVE)×SDOF/CCDMAX . . . (13) where CCDMAX refers toa maximum value among CCDG, CCDR, CCDB.

Next, image reference values AVG, AVR, AVB are calculated (Step #213).The image reference values AVG, AVR, AVB are average values of the imageobtained in an area of 1 to 50% of the range defined by the minimum andmaximum average values of the respective blocks. By averaging the imagedata of 1 to 50%, a human skin level having a reflection coefficient of20% can be calculated based on a standard film characteristic in animage having a standard luminance distribution without being subject toa very dark area and a bright area. In this embodiment, the input imagedata consists of 10 bits, the average value is calculated in an area of2⁴ (1.6%) to 2⁹ (50%).

Subsequently, the type of the image is discriminated (Step #215). Theaverage values of the respective channels in the block where the averagevalue of the G-channel is at maximum out of the average values of therespective blocks calculated in Step #209 are set to base data BASEG,BASER, BASEB. Based on these base data, base balances BBR, BBB of theR-, B-channels are calculated in accordance with Equation (14):

    BBR=BASEG/BASER

    BBB=BASEG/BASEB                                            (14)

In the case that the calculated base balance BBR is as defined inEquation (15), the image is discriminated to have a WB failure sincethere is a deviation in the black balance of the R-channel, channel, andthe WB flag(R) is set to 1:

    BBR<0.5 or BBR>2                                           (15).

Further, in the case the calculated base balance BBB is as defined inEquation (16), the image is discriminated to have a WB failure sincethere is a deviation in the black balance of the B-channel, and the WBflag(B) is set to 1:

    BBB<0.5 or BBB>2                                           (16)

Further, color balances CFR, CFB of the R-, B-channels are calculatedbased on the image reference values AVG, AVR, AVB calculated in Step#213 in accordance with Equation (17):

    CFR=(BBR×AV)/AVG

    CFB=(BBB×AVB)AVG                                     (17)

In the case that the calculated color balance CFR is as defined inEquation (18), the image is discriminated to have a color failure sincethere is a deviation in the color balance of the R-channel, and the CFflag(R) is set to 1:

    CFR<0.8 or CFR>2                                           (18)

Further, in the case that the calculated color balance CFB is as definedin Equation (19), the image is discriminated to have a color failuresince there is a deviation in the color balance of the B-channel, andthe CF flag(B) is set to 1:

    CFB<0.5 or CFB>1.2                                         (19)

Based on the combination of the WB flags and the CF flags, the obtainedfilm image is discriminated to be such a type as shown in TABLE-1.

Next, the analog gains and the table reference values are calculated(Step #217). Based on the combination of the WB flags and the CF flags,the analog gains used to read the image are and the table referencevalues GMMAVE(G), GMMAVE(R), GMMAVE(B) which serve as bases forcalculating the γ-LUT data are calculated for the respective channels asshown in TABLE-2 and TABLE-3 to be described below.

Subsequently, the digital gain is calculated (Step #219). In the casethat the exposure time NEG₋₋ T calculated in Step #211 exceeds apredetermined time, e.g., 7 msec., a ratio of the calculated exposuretime NEG₋₋ T to 7 msec., i.e., the digital gain DTG is calculated:

    DTG=NEG.sub.-- T/7.0                                       (20).

In this case, when the table data of the γ-LUT 73 is calculated, itsinput level is compressed at the digital gain DTG, and the exposure timefor reading the image is set to the predetermined time, i.e., 7 msec.

Next, the γ-LUT data to be set in γ-LUT 73 are calculated for therespective channels in accordance with Equations (1) to (3) (Step #221).For example, if STx=GMMAVE (G) in the G-channel, the reference point(STx, STy) of the γ-LUT data obtained in accordance with Equations (1)to (3) is a point where the table reference value GMMAVE(G) obtained inStep #217 is 50% of the output, i.e. a point where STy=128 in FIG. 6.

Subsequently, the γ-LUT data are transferred (Step #223). The calculatedγ-LUT data are converted into transfer data, which are transferred tothe film image reader 100 for each channel via the SCSI controller 201and stored in the γ-LUT 73 via the SCSI controller 10 and the DMAcontroller 9.

Subsequently, the image data reading conditions are set (Step #225). Theexposure time calculated in Step #211 and the analog gains calculated inStep #217 are set, and the switches SW1, SW2 and SW3 are all set on soas to perform the black level correction, the shading correction and theγ-correction.

On the other hand, if the positive film mode is discriminated to be setin Step #201, the γ-LUT data to be set in γ-LUT 73 are calculated inaccordance with Equations (4) and (5) (Step #301).

Subsequently, the γ-LUT data is transferred (Step #303). The calculatedγ-LUT data are converted into transfer data, which are transferred forthe respective channels to the film image reader 100 via the SCSIcontroller 201 and stored in the γ-LUT 73 via the SCSI controller 10 andthe DMA controller 9.

The image data reading conditions are then set (Step #305). The exposuretime and the analog gains calculated in Step #119 are set, and theswitches SW1, SW2 and SW3 are all set on so as to perform the blacklevel correction, the shading correction and the γ-correction.

FIG. 11 is a flowchart showing the subroutine "Black Level Data Setting"(Steps #103, #111, #205).

First, black data reading conditions are set (Step #401). The exposuretime and the analog gains at this time are values set in Step #101, #109or #203. The black data is read from all pixels of one line regardlessof the scanning conditions. The switches SW1, SW2, SW3 are set off, off,on, and the table of FIG. 2 is set in the γ-LUT 73.

Subsequently, the black data is read (Step #403). One line of imagedata, i.e., 2688 pixels×3 channels is read 16 times in the non-signalstate where the CCD 2 is masked by the light blocking plate 103.

Subsequently, the black level correction data are calculated (Step#405). Average values of the 16 image data are calculated for therespective channels and pixels to calculate the black level correctiondata.

The black level correction data are then transferred (Step #407). Thecalculated black level correction data are converted into transfer data,which are transferred to the film image reader 100 line by line in theorder of G, R, B via the SCSI controller 201 and stored in the RAM 74via the SCSI controller 10 and the DMA controller 9.

                                      TABLE 2                                     __________________________________________________________________________    R-CHAN.     B-CHAN.                                                               WB  CF  WB  CF  CCD ANALOG GAIN                                           FC  F   F   F   F   MAX GAIN(R)  GAIN(G) GAIN(B)                              __________________________________________________________________________    1   0   0   0   0   G   CCDG/CCDR                                                                              1.0     CCDG/CCDB                            COMBs OTHER THAN                                                              1 TO 9              R   1.0      CCDR/CCDG                                                                             CCDR/CCDB                            2   0   1   0   0                                                             3   0   0   0   1   B   CCDB/CCDR                                                                              CCDB/CCDG                                                                             1.0                                  4   0   1   0   1                                                                                 G   PGR.sub.-- N                                                                           1.0     CCDG/CCDB                            5   1   0   0   0   R   1.0      1/PGR.sub.-- N                                                                        (CCDG/CCDB) ×                                                           (1/PGR.sub.-- N)                                         B   (CCDB/CCDG) ×                                                                    CCDB/CCDG                                                                             1.0                                                          PGR.sub.-- N                                                              G   CCDG/CCDR                                                                              1.0     PGB.sub.-- N                         6   0   0   1   0   R   1.0      CCDR/CCDG                                                                             (CCDR/CCDG) ×                                                           PGB.sub.-- N                                             B   (CCDB/CCDR) ×                                                                    1/PGB.sub.-- N                                                                        1.0                                                          (1/PGB.sub.-- N)                                                          G   PGR.sub.-- N                                                                           1.0     PGB.sub.-- N                         7   1   0   1   0   R   1.0      1/PGR.sub.-- N                                                                        PGB.sub.-- N/PGR.sub.-- N                                B   PGR.sub.-- N/PGB.sub.-- N                                                              1/PGB.sub.-- N                                                                        1.0                                                      G   PGR.sub.-- N                                                                           1.0     CCDG/CCDB                            8   1   1   0   0   R   1.0      1/PGR.sub.-- N                                                                        (CCDG/CCDB) ×                                                           (1/PGR.sub.-- N)                                         B   (CCDB/CCDG) ×                                                                    CCDB/CCDG                                                                             1.0                                                          PGR.sub.-- N                                                              R   CCDG/CCDR                                                                              1.0     PGB.sub.-- N                         9   0   0   1   1   G   1.0      CCDR/CCDG                                                                             (CCDR/CCDG) ×                                                           PGB.sub.-- N                                             B   (CCDB/CCDR) ×                                                                    1/PGB.sub.-- N                                                                        1.0                                                          (1/PGR.sub.-- N)                                      __________________________________________________________________________

Next, how the analog gains in TABLE-2 are calculated is described.Operational expressions for the analog gains differ depending upon whichchannel has the maximum value CCDMAX of the CCD output in Step #211.

In the case of the flag combinations 1 to 4, i.e. in the case of thestandard image and color failure image, the gains are set so that theoutputs of the other channels agree with the maximum value CCDMAX of theCCD output.

Next, the flag combinations 5 to 9, i.e. the cases where the image is ablack-free image and a black-free and color failure image are described.

First, the gains of the channel the flag of which is not set and of theG-channel are so set as to agree with the maximum value CCDMAX of theCCD output when the maximum CCDMAX is found in the channel the flag ofwhich is not set or in the G-channel. On the other hand, the gains usedfor reading the AE data are set when the maximum CCDMAX is found in thechannel whose flags is not set or in the G-channel.

In the channel(s) where the flag(s) is/are set, the gain(s) used forreading the AE data is/are set.

In this way, since the WB balance is not deviated if the image is acolor failure image, the analog gains are corrected in the same manneras for the standard image, thereby obtaining a satisfactory image.

On the other hand, if the image is a black-free image or a black-freeand color failure image, the WB balance is deviated. Accordingly, bysetting the gains used for reading the AE data, instead of the maximumvalue CCDMAX of the CCD output, a satisfactory image can be obtained.

PGR₋₋ N, PGB₋₋ N in the flag combinations 5 to 9 are values as definedin Equation (21), i.e. the right terms of RGAIN, BGAIN of Equation (11).In other words, PGR₋₋ N, PGB₋₋ N are values for canceling the base colorof the standard negative film.

                                      TABLE 3                                     __________________________________________________________________________    R-CHAN.     B-CHAN. TABLE REFERENCE VALUES                                    FC  WBF CFF WBF CFF GMMAVE(R)                                                                              GMMAVE(G)                                                                              GMMAVE(B)                               __________________________________________________________________________    1   ALL 0 (STANDARD)                                                                              CAVR × EXP ×                                                               CAVG × EXP ×                                                               CAVB × EXP ×                COMBs OTHER THAN 1 TO 9                                                                           GAIN(R)  GAIN(G)  GAIN(B)                                 2   0   1   0   0   →          (STANDARD)                              3   0   0   0   1   (STANDARD)        ←                                  4   0   1   0   1   →          ←                                  5   1   0   0   0   (STANDARD)        (STANDARD)                              6   0   0   1   0                                                             7   1   0   1   0                                                             8   1   1   0   0   →          (STANDARD)                              9   0   0   1   1   (STANDARD)        ←                                  __________________________________________________________________________

Next, operational expressions for the table reference values of TABLE-3are described.

In TABLE-3, GAINS(G), GAIN(R), GAIN(B) are analog gains obtained fromTABLE-2. CAVG, CAVR, CAVB are image reference values converted into theCCD output before the gains are adjusted in the amplifier unit 3 whenthe pre-scanning is performed, and are as shown in Equation (22):

    CAVG=AVG/GGAIN

    CAVR=AVR/RGAIN

    CAVB=AVB/BGAIN                                             (22).

Further, EXP is a ratio of the exposure time for the main scanning andthat for the pre-scanning as shown in Equation (23):

    EXP=NEG.sub.-- T/AE.sub.--T                                (23).

Accordingly, in the case of the flag combinations 1, 5, to 7, i.e., inthe case where the image is a standard image or a black-free image, theimage reference values of the respective channels are set to the valuesused for reading the image by the main scanning.

Further, in the case of the flag combinations 2 to 4, 8 and 9, i.e. inthe case where the image is a color failure image or a black-free andcolor failure image, the image reference values of the channel(s) wherethe flag(s) is/are set are set equal to those of the G-channel.

Since the color balance is not deviated in the case of the black-freeimage, a satisfactory image can be obtained by correcting the tablereference values of the respective channels in the same manner as forthe standard images.

On the other hand, since the color balance is deviated in the case ofthe color failure image or the black-free and color failure image, asatisfactory image can be obtained by setting the table reference valuesof the respective channels equal to those of the G-channel having ahighest visibility.

With flag combinations which are not 1,1,1,1 and different from the flagcombinations 2 to 9, the respective balances are deviated in a complexmanner. Accordingly, the corresponding images are assumed to be standardimages without performing the correction as for the image correspondingto the flag combinations 2, 9.

As described above, the type of the image is assumed based on thecombination of the WB flags and the CF flags representing the results ofthe discriminations for the WB balance which is a color balance in theblack area of the image and the color balance which is a color balanceof an average bright area of the image. Values used for the colorcorrection such as the analog gains and the table reference values arechanged according to the image type. Thus, a suitable color balance canbe obtained even for a color failure image.

Although the present invention has been fully described by way ofexample with reference to the accompanying drawings, it is to beunderstood that various changes and modifications will be apparent tothose skilled in the art. Therefore, unless otherwise such changes andmodifications depart from the scope of the present invention, theyshould be construed as being included therein.

What is claimed is:
 1. A film image reading system comprising:an imagepickup device which picks up a light image of an image recorded on afilm to produce a raw image signal indicative of a magnitudecorresponding to a light amount of the light image; a signal correctingdevice which corrects the raw image signal to a proper output imagesignal in accordance with a reference relationship between raw imagesignal and output image signal, the reference relationship having afirst range for variables of raw image signal and a second range forvariables of output image signal; a range changing device which changesthe first range of the reference relationship in accordance with acharacteristic of the image; and a reading condition controller whichcontrols a reading condition of the image pickup device.
 2. A film imagereading system as defined in claim 1, wherein the range changing deviceshortens the first range of the reference relationship when themagnitude of the raw image signal is smaller than a predetermined value.3. A film image reading system as defined in claim 1, wherein the imagepickup device includes:a number of photoelectric conversion elementsarranged in a predetermined form, the photoelectric conversion elementsconverting a light image to an analog image signal; and a converter forconverting the analog image signal to a digital image signal indicativeof a light magnitude level.
 4. A film image reading system as defined inclaim 3, wherein the converter includes a shading correcting device. 5.A film image reading system as defined in claim 1, wherein the readingcondition controller controls the image pickup device to perform apre-scanning of the film before picking up a light image of an imagerecorded on the film and sets a reading condition of the image pickupdevice based on a result of the pre-scanning.
 6. A film image readingsystem comprising:an image pickup device including a number ofphotoelectric conversion elements arranged in a predetermined form, theimage pickup device converting a light image of an image recorded on afilm to an analog image signal indicative of a magnitude correspondingto a light amount of the light image; an exposure controller whichcontrols exposure time of the image pickup device; a converter whichconverts the analog image signal to a digital image signal indicative ofa light magnitude level; a signal correcting device which corrects thedigital image signal to a proper output image signal in accordance witha reference relationship between digital image signal and output imagesignal, the reference relationship having a first range for variables ofdigital image signal and a second range for variables of output imagesignal; and a range changing device which changes the first range of thereference relationship in accordance with a controlled exposure time. 7.A film image reading system as defined in claim 6, wherein the exposurecontroller controls the image pickup device to perform a pre-scanning ofthe film before picking up a light image of an image recorded on thefilm and sets an exposure time of the image pickup device based on aresult of the pre-scanning.
 8. A film image reading system as defined inclaim 7, wherein:the exposure controller includes: a calculator whichcalculates an exposure time corresponding to a result of thepre-scanning; a discriminator which discriminates whether a calculatedexposure time is greater than a predetermined value; and a setter whichis responsive to the discriminator and sets an exposure time of theimage pickup device to the predetermined value when the calculatedexposure time is discriminated to be greater than a predetermined value;and the range changing device is responsive to the discriminator andshortens the first range of the reference relationship when thecalculated exposure time is discriminated to be greater than apredetermined value.
 9. An image capturing device comprising:an imagepickup device which picks up a light image of an image to produce a rawimage signal indicative of a magnitude corresponding to a light amountof the light image; a signal correcting device which corrects the rawimage signal to a proper output image signal in accordance with areference relationship between raw image signal and output image signal,the reference relationship having a first range for variables of rawimage signal and a second range for variables of output image signal; arange changing device which changes the first range of the referencerelationship in accordance with a characteristic of the image; and animage pickup condition controller which controls an image pickupcondition of the image pickup device.
 10. An image capturing devicecomprising:an image pickup device including a number of photoelectricconversion elements arranged in a predetermined form, the image pickupdevice converting a light image of an image to an analog image signalindicative of a magnitude corresponding to a light amount of the lightimage; an exposure controller which controls exposure time of the imagepickup device; a converter which converts the analog image signal to adigital image signal indicative of a light magnitude level; a signalcorrecting device which corrects the digital image signal to a properoutput image signal in accordance with a reference relationship having afirst range for variables of digital image signal and a second range forvariables of output image signal; and a range changing device whichchanges the first range of the reference relationship in accordance witha controlled exposure time.
 11. A method for capturing images,comprising the steps of:converting a light image of an image to ananalog image signal indicative of a magnitude corresponding to a lightamount of the light image by an image pickup device; controlling anexposure time of the image pickup device; converting the analog imagesignal to a digital image signal indicative of a light magnitude level;correcting the digital image signal to a proper output image signal inaccordance with a reference relationship having a first range forvariables of the digital image signal and a second range for variablesof the output image signal; and changing the first range of thereference relationship in accordance with a controlled exposure time.12. The method of claim 11, wherein said step of changing the firstrange comprises the steps of:pre-scanning the light image to producing apre-scanning result; calculating an exposure time corresponding to theresult of the pre-scanning; discriminating whether the calculatedexposure time is greater than a predetermined value; and changing thefirst range of the reference relationship when the calculated exposuretime is discriminated to be greater than a predetermined value.
 13. Themethod of claim 12, further including the step of setting an exposuretime to the predetermined value when the calculated exposure time isdiscriminated to be greater than a predetermined value.